package com.fivefu.core.hik.dto.response;

import com.fivefu.core.hik.entity.DbHikVehicle;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

/**
 * 分页查询车辆信息v1列表返回信息
 *
 */
public class EncodeVehicleDetail {

    @ApiModelProperty(value = "车辆编号")
    private String vehicleIndexCode;

    @ApiModelProperty(value = "车辆自编号")
    private String selfNo;

    @ApiModelProperty(value = "车辆状态，0：离线，1：在线")
    private Integer status;

    @ApiModelProperty(value = "车牌号码")
    private String plateNo;

    @ApiModelProperty(value = "车牌颜色，对应数据字典的车牌颜色")
    private String plateColor;

    @ApiModelProperty(value = "区域编号")
    private String regionIndexCode;

    @ApiModelProperty(value = "车身颜色，对应数据字典的车身颜色")
    private String vehicleColor;

    @ApiModelProperty(value = "运输类型，对应数据字典的运输行业")
    private String transportType;

    @ApiModelProperty(value = "车辆类型，对应数据字典的车辆类型")
    private String vehicleType = "";

    @ApiModelProperty(value = "燃料类型，对应数据字典的燃料类型")
    private String fuelType = "";

    @ApiModelProperty(value = "业户名称")
    private String ownerName = "";

    @ApiModelProperty(value = "业户编码")
    private String ownerCode = "";

    @ApiModelProperty(value = "主设备编号，该字段已过时，默认是第一个设备的编号，请使用deviceResourceDTOList中具体能力的设备信息")
    private String primaryDeviceIndexCode;

    @ApiModelProperty(value = "从设备编号，该字段已过时，默认第二个设备的编号，请使用deviceResourceDTOList中具体能力的设备信息")
    private String subDeviceIndexCode;

    @ApiModelProperty(value = "驾驶员编号，已过时。")
    private String driverIndexCode = "";

    @ApiModelProperty(value = "关联驾驶员集合")
    private String driverResourceDTOList = "";

    @ApiModelProperty(value = "关联设备集合")
    private String deviceResourceDTOList;

    public DbHikVehicle replaceDbHikVehicle() {
        DbHikVehicle vehicle = new DbHikVehicle();
        vehicle.setVehicleIndexCode(this.vehicleIndexCode);
        vehicle.setSelfNo(this.selfNo);
        vehicle.setStatus(this.status);
        vehicle.setPlateNo(this.plateNo);
        vehicle.setPlateColor(this.plateColor);
        vehicle.setRegionIndexCode(this.regionIndexCode);
        vehicle.setVehicleColor(this.vehicleColor);
        vehicle.setTransportType(this.transportType);
        vehicle.setVehicleType(this.vehicleType);
        vehicle.setFuelType(this.fuelType);
        vehicle.setOwnerName(this.ownerName);
        vehicle.setOwnerCode(this.ownerCode);
        vehicle.setPrimaryDeviceIndexCode(this.primaryDeviceIndexCode);
        vehicle.setSubDeviceIndexCode(this.subDeviceIndexCode);
        vehicle.setDriverIndexCode(this.driverIndexCode);
        vehicle.setDriverResourceDTOList(this.driverResourceDTOList);
        vehicle.setDeviceResourceDTOList(this.deviceResourceDTOList);
        //device.setIsDelete(0);//是否删除0否1是
        return vehicle;
    }

    public DbHikVehicle replaceDbHikVehicleOne(Long vehicleLicensePlate) {
        DbHikVehicle vehicle = new DbHikVehicle();
        vehicle.setId(vehicleLicensePlate);
        vehicle.setUpdatedTime(LocalDateTime.now());
        vehicle.setVehicleIndexCode(this.vehicleIndexCode);
        vehicle.setSelfNo(this.selfNo);
        vehicle.setStatus(this.status);
        vehicle.setPlateNo(this.plateNo);
        vehicle.setPlateColor(this.plateColor);
        vehicle.setRegionIndexCode(this.regionIndexCode);
        vehicle.setVehicleColor(this.vehicleColor);
        vehicle.setTransportType(this.transportType);
        vehicle.setVehicleType(this.vehicleType);
        vehicle.setFuelType(this.fuelType);
        vehicle.setOwnerName(this.ownerName);
        vehicle.setOwnerCode(this.ownerCode);
        vehicle.setPrimaryDeviceIndexCode(this.primaryDeviceIndexCode);
        vehicle.setSubDeviceIndexCode(this.subDeviceIndexCode);
        vehicle.setDriverIndexCode(this.driverIndexCode);
        vehicle.setDriverResourceDTOList(this.driverResourceDTOList);
        vehicle.setDeviceResourceDTOList(this.deviceResourceDTOList);
        //device.setIsDelete(0);//是否删除0否1是
        return vehicle;
    }

    public String getVehicleIndexCode() {
        return vehicleIndexCode;
    }

    public void setVehicleIndexCode(String vehicleIndexCode) {
        this.vehicleIndexCode = vehicleIndexCode;
    }

    public String getSelfNo() {
        return selfNo;
    }

    public void setSelfNo(String selfNo) {
        this.selfNo = selfNo;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getPlateNo() {
        return plateNo;
    }

    public void setPlateNo(String plateNo) {
        this.plateNo = plateNo;
    }

    public String getPlateColor() {
        return plateColor;
    }

    public void setPlateColor(String plateColor) {
        this.plateColor = plateColor;
    }

    public String getRegionIndexCode() {
        return regionIndexCode;
    }

    public void setRegionIndexCode(String regionIndexCode) {
        this.regionIndexCode = regionIndexCode;
    }

    public String getVehicleColor() {
        return vehicleColor;
    }

    public void setVehicleColor(String vehicleColor) {
        this.vehicleColor = vehicleColor;
    }

    public String getTransportType() {
        return transportType;
    }

    public void setTransportType(String transportType) {
        this.transportType = transportType;
    }

    public String getVehicleType() {
        return vehicleType;
    }

    public void setVehicleType(String vehicleType) {
        this.vehicleType = vehicleType;
    }

    public String getFuelType() {
        return fuelType;
    }

    public void setFuelType(String fuelType) {
        this.fuelType = fuelType;
    }

    public String getOwnerName() {
        return ownerName;
    }

    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public String getPrimaryDeviceIndexCode() {
        return primaryDeviceIndexCode;
    }

    public void setPrimaryDeviceIndexCode(String primaryDeviceIndexCode) {
        this.primaryDeviceIndexCode = primaryDeviceIndexCode;
    }

    public String getSubDeviceIndexCode() {
        return subDeviceIndexCode;
    }

    public void setSubDeviceIndexCode(String subDeviceIndexCode) {
        this.subDeviceIndexCode = subDeviceIndexCode;
    }

    public String getDriverIndexCode() {
        return driverIndexCode;
    }

    public void setDriverIndexCode(String driverIndexCode) {
        this.driverIndexCode = driverIndexCode;
    }

    public String getDriverResourceDTOList() {
        return driverResourceDTOList;
    }

    public void setDriverResourceDTOList(String driverResourceDTOList) {
        this.driverResourceDTOList = driverResourceDTOList;
    }

    public String getDeviceResourceDTOList() {
        return deviceResourceDTOList;
    }

    public void setDeviceResourceDTOList(String deviceResourceDTOList) {
        this.deviceResourceDTOList = deviceResourceDTOList;
    }

    @Override
    public String toString() {
        return "VehicleOrgIndexCodesDetail{" +
                "vehicleIndexCode='" + vehicleIndexCode + '\'' +
                ", selfNo='" + selfNo + '\'' +
                ", status='" + status + '\'' +
                ", plateNo='" + plateNo + '\'' +
                ", plateColor='" + plateColor + '\'' +
                ", regionIndexCode='" + regionIndexCode + '\'' +
                ", vehicleColor='" + vehicleColor + '\'' +
                ", transportType='" + transportType + '\'' +
                ", vehicleType='" + vehicleType + '\'' +
                ", fuelType='" + fuelType + '\'' +
                ", ownerName='" + ownerName + '\'' +
                ", ownerCode='" + ownerCode + '\'' +
                ", primaryDeviceIndexCode='" + primaryDeviceIndexCode + '\'' +
                ", subDeviceIndexCode='" + subDeviceIndexCode + '\'' +
                ", driverIndexCode='" + driverIndexCode + '\'' +
                ", driverResourceDTOList='" + driverResourceDTOList + '\'' +
                ", deviceResourceDTOList='" + deviceResourceDTOList + '\'' +
                '}';
    }
}
